package top.huntwolf.admin.pojo.book;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import top.huntwolf.admin.pojo.BookReserve;
import top.huntwolf.admin.pojo.storage.BookStorage;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
public class BuyBook extends Book{
    private Integer searchTime;
    private Integer subjectId;
    private Integer subjectParentId;
    private Integer saleVolume;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @JsonIgnore
    private String subject;

    @JsonIgnore
    private String parentSubject;

    private List<BookReserve> bookReserves;

    private List<BookStorage> bookStorages;
}
